export default function (fn,delay){
    let timer = null;
    return function(){
        if(timer){
            clearTimeout(timer)
        }else{
            timer = setTimeout(fn,delay)
        }
    }
}